package com.ttai.presenter.activity;

import android.widget.Toast;

import com.google.gson.JsonObject;
import com.ttai.model.net.ResponseInfo;
import com.ttai.presenter.base.BasePresenter;
import com.ttai.ui.activity.IpError;

import retrofit2.Call;

public class IpErrorPresenter extends BasePresenter{
    IpError ipError;

    public IpErrorPresenter(IpError ipError) {
        this.ipError = ipError;
    }

    @Override
    protected void showError(String message) {
        Toast.makeText(ipError,message,Toast.LENGTH_SHORT).show();
    }

    @Override
    protected void parseJson(JsonObject json) {

    }

    public void ipError(String token,String loginIp,String pass,String appId,String userFlag){
        Call<ResponseInfo> ipErrorInfo = responseInfoApi.iperror(token, loginIp, pass, appId,userFlag);
        ipErrorInfo.enqueue(new CallBackAdapter());
    }
}
